<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Document</title><link rel="stylesheet" href="../font_ovdzichk71l/iconfont.css"><link rel="stylesheet" href="../css/shopping.min.css"><script src="../js/jquery.js"></script><script src="../js/cookie.js"></script><script>$(function() {
            var sum = 0
            var mav = $('.mav');
            var vam = $('.vam')
            var price = $('.p-price-total')
            var span = $('.sc-total-price>p>span')
            var check = document.getElementById('checkall')
            console.log(mav)
            for (var i = 0; i < mav.length; i++) {
                mav[i].a = i
                mav[i].onclick = function() {
                    sum += Number(price[this.a].innerHTML.split('&nbsp;')[1])
                    span[0].innerHTML = '￥' + '&nbsp;' + sum
                }
            }
            check.onclick = function() {
                checkall()
            }

            function checkall() {            
                if (check.checked)             {               
                    for (var j = 0; j < mav.length; j++) {                  
                        mav[j].checked = true;               
                    }            
                }            
                else {               
                    for (var j = 0; j < mav.length; j++) {                  
                        mav[j].checked = false;               
                    }            
                }    
                var num = 0;
                for (var i = 0; i < mav.length; i++) {
                    if (mav[i].checked == true) {
                        num += Number(mav[i].value)
                    }
                }
                span[0].innerHTML = '￥' + '&nbsp;' + num          
            }
            $('.p-del').on('click', function() {
                for (var j = 0; j < $('.p-del').length; j++) {
                    $(this).parentsUntil('.sc-pro').remove()
                    console.log(cookie.remove('shop'))
                }
            })
        })</script></head><body><div class="sc"><div class="shortcut"><div class="layout"><div class="s-sub"><ul><li><a href="#">首页</a></li><li><a href="#">华为官网</a></li><li><a href="#">荣耀网站</a></li><li><a href="#">花粉俱乐部</a></li><li><a href="#">V码(优购码)</a></li><li><a href="#">企业购</a></li><li><a href="#">Select Region</a></li><li><div class="s-dropdown"><div class="h"><a href="#" class="icon-dropdown">更多精彩</a></div><div class="b"><div class="dropdown-more w-119"><dl><dt><a href="#">EMUI</a></dt><dt><a href="#">应用市场</a></dt><dt><a href="#">华为终端云空间</a></dt><dt><a href="#">开发者联盟</a></dt></dl></div></div></div></li></ul></div><div class="s-main"><ul><li class="unlogin_status"><div id="top_unlogin" class="header-toolbar"><div class="header-toolbar-item"><div class="i-login"><div class="h"><div class=""><a href="javascript:;" id="top-index-login">请登录</a> <a href="#">&nbsp;&nbsp;注册</a></div></div></div></div></div></li><li><a href="javascript:;">我的订单</a></li><li><div class="s-dropdown s-dropdown-link"><div class="h"><a class="icon-dropdown">客户服务</a></div><div class="b"><div class="dropdown-more"><dl><dt><a href="javascript:;">服务中心</a></dt><dt><a href="javascript:;">联系客服</a></dt></dl></div></div></div></li><li><div class="s-dropdown"><div class="h"><a href="javascript:;" class="icon-dropdown">网站导航</a></div><div class="b"><div class="dropdown-navs clearfix"><a href="javascript:;"><div class="dropdown-navs-icon"><span style="font-size:0">&nbsp;</span>商城首页</div></a><div class="fl" style="width: 185.0px;margin-top: 22.0px;margin-bottom: 20.0px;"><div class="bold f16 black" style="margin-bottom:8px">频道</div><div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">华为专区</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">荣耀专区</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">企业购</a></div></div></div><div class="fl" style="width: 185.0px;margin-top: 22.0px;margin-bottom: 20.0px;"><div class="bold f16 black" style="margin-bottom:8px">产品</div><div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">手机</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">智能家居</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">平板&笔记本</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">通用配件</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">智能穿戴</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">专属配件</a></div></div></div><div class="fl" style="width: 185.0px;margin-top: 22.0px;margin-bottom: 20.0px;"><div class="bold f16 black" style="margin-bottom:8px">增值服务</div><div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">以旧换新</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">礼品包装</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">补购保障</a></div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">一口价换电池</a></div></div></div><div class="fl" style="width: 185.0px;margin-top: 22.0px;margin-bottom: 20.0px;"><div class="bold f16 black" style="margin-bottom:8px">会员</div><div><div class="fl" style="width:80px;margin-bottom:4px;overflow:hidden;white-space:nowrap"><a href="javascript">会员频道</a></div></div></div></div></div></div></li><li class="downloadApp"><div class="s-dropdown"><div class="h"><a href="javascript:;" class="icon-dropdown">手机版</a></div><div class="b"><div class="dropdown-code"><div class="clearfix dropdown-code-detail"><a href="javascript:;"><img src="../img/18k491B5OnrKngIyupsN.png" alt="" class="code-img"></a><div class="code-info"><h2>华为商城APP</h2><p class="red">新人专享好礼<br>最高5000积分</p><span class="icon-andrid fl mgr-5"></span> <span class="icon-wechat fl"></span></div></div><div class="clearfix dropdown-code-detail"><a href="javascript:;"><img src="../img/20181116180507506.jpg" alt="" class="code-img"></a><div class="code-info"><h2>华为商城公众号</h2><p class="red">微信扫一扫</p><span class="icon-wechat"></span></div></div><div class="clearfix dropdown-code-detail"><a href="javascript:;"><img src="../img/6Y7SW4v4hnJ9kl9fDC9d.jpg" alt="" class="code-img"></a><div class="code-info"><h2>微信小程序</h2><span class="icon-wechat"></span></div></div></div></div></div></li></ul></div></div></div><div class="header order-header"><div class="layout"><div class="left"><div class="logo logo-word"><a href="./index1.html" title="华为商城"><img src="../img/AF2GXbxrWmRqvyNfYzCl.png" alt=""> </a><span>我的购物车</span></div></div><div class="right"><div class="progress-area progress-area-2"><div class="progress-co-area hide" style="display:block">填写核对订单</div><div class="progress-sso-area hide"></div></div></div></div></div><div class="layout"><div class="hr-20"></div><div class="sc-list"><div class="sc-pro-title clearfix"><label class="checkbox"><input type="checkbox" class="vam checkall"> 全选</label><ul class="clearfix"><li>商品</li><li>单价</li><li>数量</li><li>小计</li><li>操作</li></ul></div><form action=""><div class="sc-pro"><!-- <div class="sc-pro-list clearfix">
                            <label for="" class="checkbox">
                                <input class="vam">
                            </label>
                            <div class="sc-pro-area">
                                <div class="sc-pro-main clearfix">
                                    <a href="javascript:;" class="p-img">
                                        <img src="../img/p01-2.png" alt="">
                                    </a>
                                    <ul>
                                        <li>
                                            <a href="javascript:;" title="荣耀 MagicBook Pro 16.1英寸笔记本电脑 i5-8265U 8GB 512GB 独显（冰河银）" class="p-name">
                                                    荣耀 MagicBook Pro 16.1英寸笔记本电脑 i5-8265U 8GB 512GB 独显（冰河银）
                                            </a>
                                        </li>
                                        <li>
                                            <div class="p-price">
                                                <span>￥&nbsp;5499.00</span>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="p-stock">
                                                <div class="p-stock-area">
                                                    <input type="number" class="p-stock-text" min="1">
                                                    <p class="p-stock-btn">
                                                        <a href="javascript:;" class="disabled">-</a>
                                                        <a href="javascript:;">+</a>
                                                    </p>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="p-price-total">
                                            ￥&nbsp;5499.00
                                        </li>
                                        <li>
                                            <a href="javascript:;" class="p-del">删除</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="sc-pro-parts"></div>
                            </div>
                        </div> --><script>var shop = cookie.get('shop');
                            if (shop) {
                                shop = JSON.parse(shop);
                                var idList = shop.map(elm => elm.id).join();
                                $.ajax({
                                    type: "get",
                                    url: "../lib/shop.php",
                                    data: {
                                        "idList": idList
                                    },
                                    dataType: "json",
                                    success: function(res) {
                                        var template = "";
                                        res.forEach((elm, i) => {
                                            var pic = JSON.parse(elm.pic);
                                            var arr = shop.filter((val, i) => {
                                                return val.id === elm.id;
                                            });
                                            template = `
                                            <div class="sc-pro-list clearfix">
                                                <label for="" class="checkbox">
                                                    <input type="checkbox" class="vam mav" value="${((arr[0].num*elm.price).toFixed(2))}">
                                                </label>
                                                <div class="sc-pro-area">
                                                    <div class="sc-pro-main clearfix">
                                                        <a href="javascript:;" class="p-img">
                                                            <img src="..${pic[0].src}" alt="${pic[0].title}">
                                                        </a>
                                                        <ul>
                                                            <li>
                                                                <a href="javascript:;" title=" ${elm.title}" class="p-name">
                                                                        ${elm.title}
                                                                </a>
                                                            </li>
                                                            <li>
                                                                <div class="p-price">
                                                                    <span>￥&nbsp;${elm.price}</span>
                                                                </div>
                                                            </li>
                                                            <li>
                                                                <div class="p-stock">
                                                                    <div class="p-stock-area">
                                                                        <input type="number" class="p-stock-text" min="1" value="${arr[0].num}" max="${elm.num}">
                                                                        <p class="p-stock-btn">
                                                                            <a href="javascript:;" class="disabled">-</a>
                                                                            <a href="javascript:;">+</a>
                                                                        </p>
                                                                    </div>
                                                                </div>
                                                            </li>
                                                            <li class="p-price-total">￥&nbsp;${((arr[0].num*elm.price).toFixed(2))}</li>
                                                            <li>
                                                                <a href="javascript:;" class="p-del">删除</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                    <div class="sc-pro-parts"></div>
                                                </div>
                                            </div>
                                                `;
                                            $('.sc-pro').append(template);
                                        });
                                    }
                                });
                            }</script></div></form></div><div><div class="sc-total-tool layout clearfix"><div class="sc-total-control"><label for="" class="checkbox"><input type="checkbox" class="vam checkall">全选</label> <a href="javascript:;">删除</a></div><div class="sc-total-btn"><a href="javascript:;">立即结算</a></div><div class="sc-total-price"><p><label>总计:</label> <span>￥&nbsp;0.00</span> <em><b>不含运费</b></em></p><div class="total-choose">已选择<em>0</em>件商品，优惠：<span>￥&nbsp;0.00</span></div></div></div></div></div><div class="slogan-container"><div class="slogan"><ul><li class="s1"><a href="javascript:;"><i></i>百强企业&nbsp;品质保证</a></li><li class="s2"><a href="javascript:;"><i></i>7天退货&nbsp;15天换货</a></li><li class="s3"><a href="javascript:;"><i></i>48元起免运费</a></li><li class="s4"><a href="javascript:;"><i></i>1000家维修网点&nbsp;全国联保</a></li></ul></div></div><div class="service-container"><div class="service"><div class="service-l fl"><dl class="s1"><dt><p class="title">购物相关</p></dt><dd><ol><li><a href="javascript:;">购物指南</a></li><li><a href="javascript:;">配送方式</a></li><li><a href="javascript:;">支付方式</a></li><li><a href="javascript:;">常见问题</a></li></ol></dd></dl><dl class="s2"><dt><p class="title">保修与退换货</p></dt><dd><ol><li><a href="javascript:;">保修政策</a></li><li><a href="javascript:;">退换货政策</a></li><li><a href="javascript:;">退换货流程</a></li><li><a href="javascript:;">保修状态查询</a></li><li><a href="javascript:;">配件防伪查询</a></li></ol></dd></dl><dl class="s3"><dt><p class="title">维修与技术支持</p></dt><dd><ol><li><a href="javascript:;">售后网点</a></li><li><a href="javascript:;">预约维修</a></li><li><a href="javascript:;">手机寄修</a></li><li><a href="javascript:;">备件价格查询</a></li><li><a href="javascript:;">上门服务</a></li></ol></dd></dl><dl class="s4"><dt><p class="title">特色服务</p></dt><dd><ol><li><a href="javascript:;">防伪查询</a></li><li><a href="javascript:;">补购保障</a></li><li><a href="javascript:;">以旧换新</a></li><li><a href="javascript:;">礼品包装</a></li></ol></dd></dl><dl class="s5"><dt><p class="title">关于我们</p></dt><dd><ol><li><a href="javascript:;">公司介绍</a></li><li><a href="javascript:;">华为商城简介</a></li><li><a href="javascript:;">华为线下门店</a></li><li><a href="javascript:;">荣耀线下门店</a></li><li><a href="javascript:;">诚征英才</a></li><li><a href="javascript:;">意见反馈</a></li></ol></dd></dl><dl class="s6" id="severlink"><dt><p class="title">友情链接</p></dt><dd><ol><li><a href="javascript:;">华为集团</a></li><li><a href="javascript:;">华为CBG集团</a></li><li><a href="javascript:;">荣耀官网</a></li><li><a href="javascript:;">花粉俱乐部</a></li><li><a href="javascript:;">华为云</a></li></ol></dd></dl></div><div class="service-r fr"><dl class="s7"><dt><p class="title">400-088-6888</p></dt><dd><ol><li><a>7x24小时客服热线（仅收市话费）</a></li></ol></dd><dd><a href="javascript:;" class="service-btn btn-line-primary"><i></i>在线客服</a></dd></dl><div class="service-code clearfix"><h2>关注Vmall：</h2><ul class="clearfix"><li><a href="javascript:;" class="iconfont">&#xe679;</a><div class="service-code-img"><img src="../img/20181116180507506.jpg" alt=""></div></li><li><a href="javascript:;" class="iconfont">&#xe677;</a></li><li><a href="javascript:;" class="iconfont">&#xe600;</a></li><li><a href="javascript:;" class="iconfont">&#xe61f;</a></li></ul></div></div></div></div><div class="footer-container" style="padding-bottom:0"><div class="footer"><div class="footer-warrant-area clearfix"><p class="footer-warrant-logo fl"><a href="javascript:;"><img src="../img/wLelYbpMVWbj9Xpaa5Fk.png" title="华为商城"></a></p><div class="fl"><ul class="footer-warrant-link"><li><a href="javascript:;">华为集团</a></li><li><a href="javascript:;">华为CBG官网</a></li><li><a href="javascript:;">荣耀官网</a></li><li><a href="javascript:;">花粉俱乐部</a></li><li><a href="javascript:;">华为应用市场</a></li><li><a href="javascript:;">EMUI</a></li><li><a href="javascript:;">华为终端云空间</a></li><li><a href="javascript:;">开发者联盟</a></li><li><a href="javascript:;">华为商城手机版</a></li><li><a href="javascript:;">网站地图</a></li></ul><a href="javascript:;" title="隐私声明">隐私声明</a> <a href="javascript:;" title="服务协议">服务协议</a> <a href="javascript:;" title="COOKIES">COOKIES</a> Copyright © 2012-2019 华为终端有限公司 版权所有 <a href="javascript:;">粤公网安备 44190002003939号</a><br>增值电信业务经营许可证：粤B2-20190762 <em>|</em>备案主体编号：44201919072182</div><p class="fr footer-warrant-img"><a href="javascript:;" class="fl"><img src="../img/20180522101715775.jpg" alt="TRUSTe隐私认证" title="TRUSTe隐私认证"> </a><a href="javascript:;" class="fl"><img src="../img/20160226162415360.png" alt="电子营业执照" title="电子营业执照"></a></p></div></div></div></div></body></html>